import API from './api.js'
import Request from './httpUtil.js'
const path = {
  
  login (data) {
    return Request('post', API.login , data, true)
  },
 
  getIndexType (code) {
    return Request('get', API.getIndexType + '/' +code)
  },



  getSecondType (levelOneCode) {
    return Request('get', API.getSecondType + '/' +levelOneCode)
  },



  //获取部门规章列表
  getRulesList(page, pageSize,twoLevelId ){
    return Request('get', API.getRulesList  + '/' + page + '/' + pageSize+ '/' + twoLevelId  )
  },

  //获取mingsheng列表
  getLiveList(page, pageSize,twoLevelId ){
    return Request('get', API.getLiveList  + '/' + page + '/' + pageSize+ '/' + twoLevelId  )
  },

  //获取yuqing列表
  getLawList(page, pageSize,twoLevelId ){
    return Request('get', API.getLawList  + '/' + page + '/' + pageSize+ '/' + twoLevelId  )
  },
  //获取法律法规列表
  getLawsList(page, pageSize,twoLevelId ){
    return Request('get', API.getLawsList  + '/' + page + '/' + pageSize+ '/' + twoLevelId  )
  },

 //获取法律法规详情
  getlawsDetails(id){
    return Request('get', API.getlawsDetails + '/'  + id )
  },
 //获取xiangq
 getLiveDetails(id){
  return Request('get', API.getLiveDetails + '/'  + id )
},


 //获取xiangq
 getlawDetails(id){
  return Request('get', API.getlawDetails + '/'  + id )
},


 //获取xiangq
 getRuleDetails(id){
  return Request('get', API.getRuleDetails + '/'  + id )
},



  // 获取课程列表
  getCourseList (page, pageSize) {
    return Request('get', API.getCourseList + '/' + page + '/' + pageSize)
  },

  //获取课程章节详情
  getChapterDetails (id) {
    return Request('get', API.getChapterDetails + '/' +id)
  },

  //获取课程练习题列表
  getExerciseList(page, pageSize,courseId ){
    return Request('get', API.getExerciseList  + '/' + page + '/' + pageSize+ '/' + courseId  )
  },


  //获取课程章节列表
  getChapterList(page, pageSize,courseId ){
    return Request('get', API.getChapterList  + '/' + page + '/' + pageSize+ '/' + courseId  )
  },

  
 getVideolist(){
  return Request('get', API.getVideolist )
},



//从业领域列表
getField(){
  return Request('get', API.getField )
},
//获取考试列表。按开考时间倒序
getExamlist(page, pageSize,fieldl2){
  return Request('get', API.getExamlist  + '/' + page + '/' + pageSize+ '/' + fieldl2   )
},

//获取考试列表。按开考时间倒序
beginExam(data){
  return Request('post', API.beginExam , data ,true )
},


//查询考试成绩
queryRecord(data){
  return Request('post', API.queryRecord  , data,true   )
},
//获取某个考试记录的答题报告
recordReport(data){
  return Request('post', API.recordReport , data ,true  )
},

//获取某个考试记录的答题报告
addRecord(data){
  return Request('post', API.addRecord,JSON.stringify(data),true)
},
//获取某个考试记录的答题报告
rank(data){
  return Request('post', API.rank,data,true)
},

getThoughGame(data){
  return Request('post', API.getThoughGame,data,true)
}
};
export default path
